package com.zhanghp.demo01;

/**
 * @author zhanghp
 * @date 2022-08-30 15:09
 */
public class Travel {
    private TravelStrategy travelStrategy;

    public Travel(TravelStrategy strategy) {
        this.travelStrategy = strategy;
    }

    public void transprotation(){
        this.travelStrategy.excute();
    }

    public void changeStrategy(TravelStrategy strategy){
        this.travelStrategy = strategy;
    }
}
